{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "7f50f79a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"1002\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  const force = true;\n",
       "\n",
       "  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  const JS_MIME_TYPE = 'application/javascript';\n",
       "  const HTML_MIME_TYPE = 'text/html';\n",
       "  const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
       "  const CLASS_NAME = 'output_bokeh rendered_html';\n",
       "\n",
       "  /**\n",
       "   * Render data to the DOM node\n",
       "   */\n",
       "  function render(props, node) {\n",
       "    const script = document.createElement(\"script\");\n",
       "    node.appendChild(script);\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when an output is cleared or removed\n",
       "   */\n",
       "  function handleClearOutput(event, handle) {\n",
       "    const cell = handle.cell;\n",
       "\n",
       "    const id = cell.output_area._bokeh_element_id;\n",
       "    const server_id = cell.output_area._bokeh_server_id;\n",
       "    // Clean up Bokeh references\n",
       "    if (id != null && id in Bokeh.index) {\n",
       "      Bokeh.index[id].model.document.clear();\n",
       "      delete Bokeh.index[id];\n",
       "    }\n",
       "\n",
       "    if (server_id !== undefined) {\n",
       "      // Clean up Bokeh references\n",
       "      const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
       "      cell.notebook.kernel.execute(cmd_clean, {\n",
       "        iopub: {\n",
       "          output: function(msg) {\n",
       "            const id = msg.content.text.trim();\n",
       "            if (id in Bokeh.index) {\n",
       "              Bokeh.index[id].model.document.clear();\n",
       "              delete Bokeh.index[id];\n",
       "            }\n",
       "          }\n",
       "        }\n",
       "      });\n",
       "      // Destroy server and session\n",
       "      const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
       "      cell.notebook.kernel.execute(cmd_destroy);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when a new output is added\n",
       "   */\n",
       "  function handleAddOutput(event, handle) {\n",
       "    const output_area = handle.output_area;\n",
       "    const output = handle.output;\n",
       "\n",
       "    // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
       "    if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n",
       "      return\n",
       "    }\n",
       "\n",
       "    const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
       "\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
       "      toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
       "      // store reference to embed id on output_area\n",
       "      output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "    }\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "      const bk_div = document.createElement(\"div\");\n",
       "      bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "      const script_attrs = bk_div.children[0].attributes;\n",
       "      for (let i = 0; i < script_attrs.length; i++) {\n",
       "        toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "        toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
       "      }\n",
       "      // store reference to server id on output_area\n",
       "      output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function register_renderer(events, OutputArea) {\n",
       "\n",
       "    function append_mime(data, metadata, element) {\n",
       "      // create a DOM node to render to\n",
       "      const toinsert = this.create_output_subarea(\n",
       "        metadata,\n",
       "        CLASS_NAME,\n",
       "        EXEC_MIME_TYPE\n",
       "      );\n",
       "      this.keyboard_manager.register_events(toinsert);\n",
       "      // Render to node\n",
       "      const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "      render(props, toinsert[toinsert.length - 1]);\n",
       "      element.append(toinsert);\n",
       "      return toinsert\n",
       "    }\n",
       "\n",
       "    /* Handle when an output is cleared or removed */\n",
       "    events.on('clear_output.CodeCell', handleClearOutput);\n",
       "    events.on('delete.Cell', handleClearOutput);\n",
       "\n",
       "    /* Handle when a new output is added */\n",
       "    events.on('output_added.OutputArea', handleAddOutput);\n",
       "\n",
       "    /**\n",
       "     * Register the mime type and append_mime function with output_area\n",
       "     */\n",
       "    OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "      /* Is output safe? */\n",
       "      safe: true,\n",
       "      /* Index of renderer in `output_area.display_order` */\n",
       "      index: 0\n",
       "    });\n",
       "  }\n",
       "\n",
       "  // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
       "  if (root.Jupyter !== undefined) {\n",
       "    const events = require('base/js/events');\n",
       "    const OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  const NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    const el = document.getElementById(\"1002\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) {\n",
       "        if (callback != null)\n",
       "          callback();\n",
       "      });\n",
       "    } finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.debug(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(css_urls, js_urls, callback) {\n",
       "    if (css_urls == null) css_urls = [];\n",
       "    if (js_urls == null) js_urls = [];\n",
       "\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
       "\n",
       "    function on_load() {\n",
       "      root._bokeh_is_loading--;\n",
       "      if (root._bokeh_is_loading === 0) {\n",
       "        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
       "        run_callbacks()\n",
       "      }\n",
       "    }\n",
       "\n",
       "    function on_error(url) {\n",
       "      console.error(\"failed to load \" + url);\n",
       "    }\n",
       "\n",
       "    for (let i = 0; i < css_urls.length; i++) {\n",
       "      const url = css_urls[i];\n",
       "      const element = document.createElement(\"link\");\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error.bind(null, url);\n",
       "      element.rel = \"stylesheet\";\n",
       "      element.type = \"text/css\";\n",
       "      element.href = url;\n",
       "      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
       "      document.body.appendChild(element);\n",
       "    }\n",
       "\n",
       "    for (let i = 0; i < js_urls.length; i++) {\n",
       "      const url = js_urls[i];\n",
       "      const element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error.bind(null, url);\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  function inject_raw_css(css) {\n",
       "    const element = document.createElement(\"style\");\n",
       "    element.appendChild(document.createTextNode(css));\n",
       "    document.body.appendChild(element);\n",
       "  }\n",
       "\n",
       "  \n",
       "  const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n",
       "  const css_urls = [];\n",
       "  \n",
       "\n",
       "  const inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "    \n",
       "    \n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if (root.Bokeh !== undefined || force === true) {\n",
       "      \n",
       "    for (let i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i].call(root, root.Bokeh);\n",
       "    }\n",
       "    if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(css_urls, js_urls, function() {\n",
       "      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));"
      ],
      "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  const force = true;\n\n  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n    root._bokeh_onload_callbacks = [];\n    root._bokeh_is_loading = undefined;\n  }\n\n  \n\n  \n  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  const NB_LOAD_WARNING = {'data': {'text/html':\n     \"<div style='background-color: #fdd'>\\n\"+\n     \"<p>\\n\"+\n     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n     \"</p>\\n\"+\n     \"<ul>\\n\"+\n     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n     \"</ul>\\n\"+\n     \"<code>\\n\"+\n     \"from bokeh.resources import INLINE\\n\"+\n     \"output_notebook(resources=INLINE)\\n\"+\n     \"</code>\\n\"+\n     \"</div>\"}};\n\n  function display_loaded() {\n    const el = document.getElementById(\"1002\");\n    if (el != null) {\n      el.textContent = \"BokehJS is loading...\";\n    }\n    if (root.Bokeh !== undefined) {\n      if (el != null) {\n        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) {\n        if (callback != null)\n          callback();\n      });\n    } finally {\n      delete root._bokeh_onload_callbacks\n    }\n    console.debug(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(css_urls, js_urls, callback) {\n    if (css_urls == null) css_urls = [];\n    if (js_urls == null) js_urls = [];\n\n    root._bokeh_onload_callbacks.push(callback);\n    if (root._bokeh_is_loading > 0) {\n      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n    root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n    function on_load() {\n      root._bokeh_is_loading--;\n      if (root._bokeh_is_loading === 0) {\n        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n        run_callbacks()\n      }\n    }\n\n    function on_error(url) {\n      console.error(\"failed to load \" + url);\n    }\n\n    for (let i = 0; i < css_urls.length; i++) {\n      const url = css_urls[i];\n      const element = document.createElement(\"link\");\n      element.onload = on_load;\n      element.onerror = on_error.bind(null, url);\n      element.rel = \"stylesheet\";\n      element.type = \"text/css\";\n      element.href = url;\n      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n      document.body.appendChild(element);\n    }\n\n    for (let i = 0; i < js_urls.length; i++) {\n      const url = js_urls[i];\n      const element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error.bind(null, url);\n      element.async = false;\n      element.src = url;\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n  };\n\n  function inject_raw_css(css) {\n    const element = document.createElement(\"style\");\n    element.appendChild(document.createTextNode(css));\n    document.body.appendChild(element);\n  }\n\n  \n  const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n  const css_urls = [];\n  \n\n  const inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\n    function(Bokeh) {\n    \n    \n    }\n  ];\n\n  function run_inline_js() {\n    \n    if (root.Bokeh !== undefined || force === true) {\n      \n    for (let i = 0; i < inline_js.length; i++) {\n      inline_js[i].call(root, root.Bokeh);\n    }\n    if (force === true) {\n        display_loaded();\n      }} else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    } else if (force !== true) {\n      const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (root._bokeh_is_loading === 0) {\n    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n    run_inline_js();\n  } else {\n    load_libs(css_urls, js_urls, function() {\n      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n      run_inline_js();\n    });\n  }\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 数据准备\n",
    "from bokeh.plotting import output_notebook,figure,show\n",
    "output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "eb75b3a1",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.faker import Faker\n",
    "from pyecharts.datasets import register_url\n",
    "import pandas as pd \n",
    "import seaborn as sns \n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from pyecharts.charts import Line\n",
    "%matplotlib inline\n",
    "#显示中文\n",
    "plt.rcParams['font.family'] = ['sans-serif']\n",
    "plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']\n",
    "# 解决保存图像是负号'-'显示为方块的问题\n",
    "plt.rcParams['axes.unicode_minus'] = False "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "861d3369",
   "metadata": {},
   "source": [
    "# 总体人口分布（地图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "901416ed",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['安徽', 62200728],\n",
       " ['北京', 25215113],\n",
       " ['重庆', 31791850],\n",
       " ['福建', 39789666],\n",
       " ['甘肃', 26406335],\n",
       " ['广东', 13302000],\n",
       " ['广西', 50027447],\n",
       " ['贵州', 35669112],\n",
       " ['湖南', 9645206],\n",
       " ['湖北', 76878832],\n",
       " ['黑龙江', 38434821],\n",
       " ['河南', 94375586],\n",
       " ['香港', 7478895],\n",
       " ['河北', 59783978],\n",
       " ['海南', 69804905],\n",
       " ['内蒙古', 25617169],\n",
       " ['江苏', 81134214],\n",
       " ['江西', 46784338],\n",
       " ['吉林', 27653275],\n",
       " ['辽宁', 44260682],\n",
       " ['澳门', 649335],\n",
       " ['宁夏', 7139502],\n",
       " ['青海', 6146631],\n",
       " ['山西', 38379669],\n",
       " ['山东', 10102710],\n",
       " ['上海', 27014899],\n",
       " ['陕西', 37702752],\n",
       " ['四川', 82613096],\n",
       " ['天津', 19898557],\n",
       " ['西藏', 3414708],\n",
       " ['新疆', 24697132],\n",
       " ['云南', 49033220],\n",
       " ['浙江', 56292546]]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "total = pd.read_csv('china_provinces_population.csv')\n",
    "pro = total['省']\n",
    "num = total['人口数']\n",
    "data = [list(z)for z in zip(pro,num)]\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "967b9991",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"b753945c0f8d4e5bb2638d4cefcbe3f9\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_b753945c0f8d4e5bb2638d4cefcbe3f9 = echarts.init(\n",
       "                    document.getElementById('b753945c0f8d4e5bb2638d4cefcbe3f9'), 'white', {renderer: 'canvas'});\n",
       "                var option_b753945c0f8d4e5bb2638d4cefcbe3f9 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u4eba\\u6570\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": 62200728\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 25215113\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 31791850\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": 39789666\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": 26406335\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 13302000\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": 50027447\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": 35669112\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": 9645206\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": 76878832\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": 38434821\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": 94375586\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": 7478895\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": 59783978\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": 69804905\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": 25617169\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": 81134214\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": 46784338\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": 27653275\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": 44260682\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6fb3\\u95e8\",\n",
       "                    \"value\": 649335\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": 7139502\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": 6146631\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": 38379669\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": 10102710\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 27014899\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": 37702752\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 82613096\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 19898557\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": 3414708\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": 24697132\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": 49033220\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": 56292546\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4eba\\u6570\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u4eba\\u6570\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"left\": 20,\n",
       "            \"top\": 100,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Map-\\u4eba\\u6570\\u5206\\u5e03\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"horizontal\",\n",
       "        \"itemSize\": 15,\n",
       "        \"itemGap\": 10,\n",
       "        \"left\": \"80%\",\n",
       "        \"right\": 20,\n",
       "        \"top\": 20,\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"type\": \"png\",\n",
       "                \"backgroundColor\": \"auto\",\n",
       "                \"connectedBackgroundColor\": \"#fff\",\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4fdd\\u5b58\\u4e3a\\u56fe\\u7247\",\n",
       "                \"pixelRatio\": 1\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u8fd8\\u539f\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                \"readOnly\": false,\n",
       "                \"lang\": [\n",
       "                    \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                    \"\\u5173\\u95ed\",\n",
       "                    \"\\u5237\\u65b0\"\n",
       "                ],\n",
       "                \"backgroundColor\": \"#fff\",\n",
       "                \"textareaColor\": \"#fff\",\n",
       "                \"textareaBorderColor\": \"#333\",\n",
       "                \"textColor\": \"#000\",\n",
       "                \"buttonColor\": \"#c23531\",\n",
       "                \"buttonTextColor\": \"#fff\"\n",
       "            },\n",
       "            \"dataZoom\": {\n",
       "                \"show\": true,\n",
       "                \"title\": {\n",
       "                    \"zoom\": \"\\u533a\\u57df\\u7f29\\u653e\",\n",
       "                    \"back\": \"\\u533a\\u57df\\u7f29\\u653e\\u8fd8\\u539f\"\n",
       "                },\n",
       "                \"icon\": {},\n",
       "                \"xAxisIndex\": false,\n",
       "                \"yAxisIndex\": false,\n",
       "                \"filterMode\": \"filter\"\n",
       "            },\n",
       "            \"magicType\": {\n",
       "                \"show\": true,\n",
       "                \"type\": [\n",
       "                    \"line\",\n",
       "                    \"bar\",\n",
       "                    \"stack\",\n",
       "                    \"tiled\"\n",
       "                ],\n",
       "                \"title\": {\n",
       "                    \"line\": \"\\u5207\\u6362\\u4e3a\\u6298\\u7ebf\\u56fe\",\n",
       "                    \"bar\": \"\\u5207\\u6362\\u4e3a\\u67f1\\u72b6\\u56fe\",\n",
       "                    \"stack\": \"\\u5207\\u6362\\u4e3a\\u5806\\u53e0\",\n",
       "                    \"tiled\": \"\\u5207\\u6362\\u4e3a\\u5e73\\u94fa\"\n",
       "                },\n",
       "                \"icon\": {}\n",
       "            },\n",
       "            \"brush\": {\n",
       "                \"icon\": {},\n",
       "                \"title\": {\n",
       "                    \"rect\": \"\\u77e9\\u5f62\\u9009\\u62e9\",\n",
       "                    \"polygon\": \"\\u5708\\u9009\",\n",
       "                    \"lineX\": \"\\u6a2a\\u5411\\u9009\\u62e9\",\n",
       "                    \"lineY\": \"\\u7eb5\\u5411\\u9009\\u62e9\",\n",
       "                    \"keep\": \"\\u4fdd\\u6301\\u9009\\u62e9\",\n",
       "                    \"clear\": \"\\u6e05\\u9664\\u9009\\u62e9\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"piecewise\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100000000,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 14,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_b753945c0f8d4e5bb2638d4cefcbe3f9.setOption(option_b753945c0f8d4e5bb2638d4cefcbe3f9);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20418be8c70>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2.显示在notebook里\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.faker import Faker\n",
    "\n",
    "c = (\n",
    "    Map()\n",
    "    .add(\"人数\", data, \"china\")\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"Map-人数分布\"), \n",
    "        visualmap_opts=opts.VisualMapOpts(\n",
    "            max_ = 100000000,\n",
    "            is_piecewise = True\n",
    "        ),\n",
    "        legend_opts = opts.LegendOpts(\n",
    "            pos_left = 20,\n",
    "            pos_top = 100,\n",
    "        ),\n",
    "        toolbox_opts = opts.ToolboxOpts(\n",
    "            pos_right= 20,\n",
    "            pos_top = 20,\n",
    "        )\n",
    "    )\n",
    "#     .render(\"map_base.html\")\n",
    ")\n",
    "\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "70b5525a",
   "metadata": {},
   "source": [
    "# 中国人口和劳动人口的历史变化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "0f0d7847",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>年末总人口(万人)</th>\n",
       "      <th>男性人口(万人)</th>\n",
       "      <th>女性人口(万人)</th>\n",
       "      <th>城镇人口(万人)</th>\n",
       "      <th>乡村人口(万人)</th>\n",
       "      <th>劳动力(万人)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021年</td>\n",
       "      <td>141260</td>\n",
       "      <td>72311</td>\n",
       "      <td>68949</td>\n",
       "      <td>91425</td>\n",
       "      <td>49835</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020年</td>\n",
       "      <td>141212</td>\n",
       "      <td>72357</td>\n",
       "      <td>68855</td>\n",
       "      <td>90220</td>\n",
       "      <td>50992</td>\n",
       "      <td>78392.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2019年</td>\n",
       "      <td>141008</td>\n",
       "      <td>72039</td>\n",
       "      <td>68969</td>\n",
       "      <td>88426</td>\n",
       "      <td>52582</td>\n",
       "      <td>78985.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2018年</td>\n",
       "      <td>140541</td>\n",
       "      <td>71864</td>\n",
       "      <td>68677</td>\n",
       "      <td>86433</td>\n",
       "      <td>54108</td>\n",
       "      <td>78653.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2017年</td>\n",
       "      <td>140011</td>\n",
       "      <td>71650</td>\n",
       "      <td>68361</td>\n",
       "      <td>84343</td>\n",
       "      <td>55668</td>\n",
       "      <td>79042.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2016年</td>\n",
       "      <td>139232</td>\n",
       "      <td>71307</td>\n",
       "      <td>67925</td>\n",
       "      <td>81924</td>\n",
       "      <td>57308</td>\n",
       "      <td>79282.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      指标  年末总人口(万人)  男性人口(万人)  女性人口(万人)  城镇人口(万人)  乡村人口(万人)  劳动力(万人)\n",
       "0  2021年     141260     72311     68949     91425     49835      NaN\n",
       "1  2020年     141212     72357     68855     90220     50992  78392.0\n",
       "2  2019年     141008     72039     68969     88426     52582  78985.0\n",
       "3  2018年     140541     71864     68677     86433     54108  78653.0\n",
       "4  2017年     140011     71650     68361     84343     55668  79042.0\n",
       "5  2016年     139232     71307     67925     81924     57308  79282.0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pwork = pd.read_excel('人口及劳动力历史变化.xlsx')\n",
    "pwork.head(6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "635bae95",
   "metadata": {},
   "outputs": [],
   "source": [
    "pwork = pwork[~pwork['劳动力(万人)'].isnull()]\n",
    "pwork[['指标','年末总人口(万人)','劳动力(万人)']]\n",
    "pwork = pwork.reindex(index=pwork.index[::-1]) #逆序输出"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "78fac43c",
   "metadata": {},
   "source": [
    "## 年末总人口（单虚线图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "99ecb82c",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"22b0fd0bb6744ed8ba3d0daf6003c8d1\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_22b0fd0bb6744ed8ba3d0daf6003c8d1 = echarts.init(\n",
       "                    document.getElementById('22b0fd0bb6744ed8ba3d0daf6003c8d1'), 'white', {renderer: 'canvas'});\n",
       "                var option_22b0fd0bb6744ed8ba3d0daf6003c8d1 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u5168\\u56fd\\u603b\\u4eba\\u53e3\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    57482\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    64653\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    96259\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    97542\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    98705\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    100072\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    101654\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    103008\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    104357\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    105851\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    107507\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    109300\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    111026\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    112704\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    114333\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    115823\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    117171\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    118517\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    119850\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    121121\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    122389\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    123626\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    124761\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    125786\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    126743\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    127627\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    128453\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    129227\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    129988\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    130756\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    131448\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    132129\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    132802\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    133450\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    134091\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    134916\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    135922\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    136726\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    137646\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    138326\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    139232\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    140011\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    140541\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    141008\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    141212\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5168\\u56fd\\u603b\\u4eba\\u53e3\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5168\\u56fd\\u603b\\u4eba\\u53e3\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u603b\\u4eba\\u53e3\\u5386\\u53f2\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_22b0fd0bb6744ed8ba3d0daf6003c8d1.setOption(option_22b0fd0bb6744ed8ba3d0daf6003c8d1);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20418b74f70>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pwork['劳动力占比'] = pwork['劳动力(万人)']/pwork['年末总人口(万人)']\n",
    "x = pwork['指标']\n",
    "y1 = pwork['年末总人口(万人)']\n",
    "# 绘制折线图\n",
    "c = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"全国总人口\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y1,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"中国总人口历史变化\"),\n",
    "        tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\", boundary_gap=False),\n",
    "    )\n",
    "# .render(\"中国总人口历史变化.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "92b85d0d",
   "metadata": {},
   "source": [
    "## 劳动力数量（单实线图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "ac848de0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"8bd4c2554a88478d8a63e0897df9983f\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_8bd4c2554a88478d8a63e0897df9983f = echarts.init(\n",
       "                    document.getElementById('8bd4c2554a88478d8a63e0897df9983f'), 'white', {renderer: 'canvas'});\n",
       "                var option_8bd4c2554a88478d8a63e0897df9983f = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    21106.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    23971.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    40682.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    41592.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    42903.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    44165.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    45674.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    46707.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    48433.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    50112.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    51546.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    53060.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    54630.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    55707.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    65323.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    66091.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    66782.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    67468.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    68135.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    68855.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    69765.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    70800.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    72087.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    72791.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    73992.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    73884.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    74492.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    74911.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    75290.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    76120.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    76315.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    76531.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    77046.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    77510.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    78388.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    78579.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    78894.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    79300.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    79690.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    80091.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    79282.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    79042.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    78653.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    78985.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    78392.0\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\\u5386\\u53f2\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_8bd4c2554a88478d8a63e0897df9983f.setOption(option_8bd4c2554a88478d8a63e0897df9983f);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20418bd38b0>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pwork['劳动力占比'] = pwork['劳动力(万人)']/pwork['年末总人口(万人)']\n",
    "x = pwork['指标']\n",
    "y2 = pwork['劳动力(万人)']\n",
    "y3 = pwork['劳动力占比']\n",
    "# 绘制折线图\n",
    "c = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"劳动力人口\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y2,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"中国劳动力人口历史变化\"),\n",
    "        tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\", boundary_gap=False),\n",
    "    )\n",
    "# .render(\"中国劳动力人口历史变化.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ae6f8364",
   "metadata": {},
   "source": [
    "## 汇总（多线图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "40e3bcad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"4c4aad394e9b4ee7ac8aafc8b10024ce\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_4c4aad394e9b4ee7ac8aafc8b10024ce = echarts.init(\n",
       "                    document.getElementById('4c4aad394e9b4ee7ac8aafc8b10024ce'), 'white', {renderer: 'canvas'});\n",
       "                var option_4c4aad394e9b4ee7ac8aafc8b10024ce = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u5168\\u56fd\\u603b\\u4eba\\u53e3\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    57482\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    64653\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    96259\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    97542\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    98705\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    100072\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    101654\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    103008\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    104357\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    105851\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    107507\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    109300\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    111026\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    112704\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    114333\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    115823\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    117171\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    118517\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    119850\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    121121\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    122389\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    123626\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    124761\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    125786\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    126743\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    127627\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    128453\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    129227\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    129988\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    130756\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    131448\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    132129\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    132802\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    133450\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    134091\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    134916\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    135922\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    136726\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    137646\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    138326\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    139232\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    140011\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    140541\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    141008\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    141212\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    21106.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    23971.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    40682.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    41592.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    42903.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    44165.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    45674.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    46707.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    48433.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    50112.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    51546.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    53060.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    54630.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    55707.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    65323.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    66091.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    66782.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    67468.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    68135.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    68855.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    69765.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    70800.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    72087.0\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    72791.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    73992.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    73884.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    74492.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    74911.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    75290.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    76120.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    76315.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    76531.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    77046.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    77510.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    78388.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    78579.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    78894.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    79300.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    79690.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    80091.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    79282.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    79042.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    78653.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    78985.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    78392.0\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u52b3\\u52a8\\u529b\\u5360\\u6bd4\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    0.3671758115584009\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    0.3707639243345243\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    0.42263061116363143\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    0.426400934981854\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    0.4346588318727521\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    0.44133224078663363\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    0.44930843842839435\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    0.45343080149114634\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    0.46410878043638665\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    0.47342018497699595\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    0.4794664533472239\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    0.4854528819762123\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    0.4920469079314755\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    0.49427704429301533\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    0.5713398581336971\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    0.5706206884642947\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    0.5699533160935727\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    0.5692685437532169\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    0.5685022945348353\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    0.5684811056711884\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    0.5700267180874098\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    0.5726950641450828\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    0.5778007550436435\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    0.578689202295963\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    0.5837955547840906\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    0.578905717442234\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    0.5799163896522463\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    0.5796853598706153\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    0.5792073114441333\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    0.5821530178347456\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    0.5805717850404722\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    0.5792142527378547\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    0.5801569253475098\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    0.5808167853128513\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    0.5845880782453707\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    0.5824290669750066\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    0.5804358382013214\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    0.5799921009903017\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    0.5789488978975051\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    0.5790017784075301\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    0.5694236957021375\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    0.5645413574647706\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    0.5596445165467728\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    0.5601455236582321\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    0.5551369571991049\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5168\\u56fd\\u603b\\u4eba\\u53e3\",\n",
       "                \"\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\",\n",
       "                \"\\u52b3\\u52a8\\u529b\\u5360\\u6bd4\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5168\\u56fd\\u603b\\u4eba\\u53e3\": true,\n",
       "                \"\\u52b3\\u52a8\\u529b\\u4eba\\u53e3\": true,\n",
       "                \"\\u52b3\\u52a8\\u529b\\u5360\\u6bd4\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e09\\u5927\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u8d8b\\u52bf\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_4c4aad394e9b4ee7ac8aafc8b10024ce.setOption(option_4c4aad394e9b4ee7ac8aafc8b10024ce);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20415a5f2e0>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pwork['劳动力占比'] = pwork['劳动力(万人)']/pwork['年末总人口(万人)']\n",
    "x = pwork['指标']\n",
    "y1 = pwork['年末总人口(万人)']\n",
    "y2 = pwork['劳动力(万人)']\n",
    "y3 = pwork['劳动力占比']\n",
    "\n",
    "c = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"全国总人口\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y1,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .add_yaxis(\n",
    "        series_name=\"劳动力人口\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y2,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .add_yaxis(\n",
    "        series_name=\"劳动力占比\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y3,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"三大产业就业趋势\"),\n",
    "        tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\", boundary_gap=False),\n",
    "    )\n",
    "# .render(\"中国劳动力变化折线图堆叠.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7f0d64be",
   "metadata": {},
   "source": [
    "# 男女性人口增长趋势\n",
    "## 女性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "18a6d00a",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"f7da2ecc3b8e45ac98934d49ddd98f5e\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_f7da2ecc3b8e45ac98934d49ddd98f5e = echarts.init(\n",
       "                    document.getElementById('f7da2ecc3b8e45ac98934d49ddd98f5e'), 'white', {renderer: 'canvas'});\n",
       "                var option_f7da2ecc3b8e45ac98934d49ddd98f5e = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u5973\\u6027\\u4eba\\u53e3\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    27649\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    31184\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    46692\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    47350\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    47920\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    48553\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    49302\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    49856\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    50509\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    51126\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    51926\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    53010\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    53825\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    54605\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    55429\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    56357\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    57360\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    58045\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    58604\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    59313\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    60189\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    60495\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    60821\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    61094\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    61306\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    61955\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    62338\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    62671\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    63012\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    63381\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    63720\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    64081\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    64445\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    64803\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    65343\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    65755\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    66262\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    66663\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    67124\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    67469\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    67925\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    68361\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    68677\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    68969\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    68855\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5973\\u6027\\u4eba\\u53e3\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5973\\u6027\\u4eba\\u53e3\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u5973\\u6027\\u4eba\\u53e3\\u5386\\u53f2\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_f7da2ecc3b8e45ac98934d49ddd98f5e.setOption(option_f7da2ecc3b8e45ac98934d49ddd98f5e);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x204194f7f10>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = pwork['指标']\n",
    "y1 = pwork['女性人口(万人)']\n",
    "y2 = pwork['男性人口(万人)']\n",
    "\n",
    "c = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"女性人口\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y1,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"中国女性人口历史变化\"),\n",
    "        tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\", boundary_gap=False),\n",
    "    )\n",
    "# .render(\"中国女性人口历史变化.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b6781aaa",
   "metadata": {},
   "source": [
    "## 男性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "63b22206",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"605cedeaf8494f6a86ae7c4871e079f2\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_605cedeaf8494f6a86ae7c4871e079f2 = echarts.init(\n",
       "                    document.getElementById('605cedeaf8494f6a86ae7c4871e079f2'), 'white', {renderer: 'canvas'});\n",
       "                var option_605cedeaf8494f6a86ae7c4871e079f2 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u7537\\u6027\\u4eba\\u53e3\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    29833\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    33469\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    49567\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    50192\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    50785\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    51519\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    52352\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    53152\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    53848\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    54725\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    55581\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    56290\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    57201\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    58099\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    58904\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    59466\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    59811\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    60472\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    61246\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    61808\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    62200\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    63131\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    63940\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    64692\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    65437\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    65672\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    66115\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    66556\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    66976\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    67375\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    67728\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    68048\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    68357\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    68647\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    68748\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    69161\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    69660\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    70063\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    70522\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    70857\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    71307\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    71650\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    71864\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    72039\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    72357\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u7537\\u6027\\u4eba\\u53e3\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u7537\\u6027\\u4eba\\u53e3\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u7537\\u6027\\u4eba\\u53e3\\u5386\\u53f2\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_605cedeaf8494f6a86ae7c4871e079f2.setOption(option_605cedeaf8494f6a86ae7c4871e079f2);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20419465340>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = pwork['指标']\n",
    "y1 = pwork['男性人口(万人)']\n",
    "\n",
    "c = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"男性人口\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y1,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"中国男性人口历史变化\"),\n",
    "        tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\", boundary_gap=False),\n",
    "    )\n",
    "# .render(\"中国男性人口历史变化.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e05a82da",
   "metadata": {},
   "source": [
    "# 各行业及省份与GDP的关系"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "4221ea37",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>region</th>\n",
       "      <th>year</th>\n",
       "      <th>gdp</th>\n",
       "      <th>industry</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>北京市</td>\n",
       "      <td>2020年</td>\n",
       "      <td>836.5</td>\n",
       "      <td>交通运输、仓储和邮政业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>北京市</td>\n",
       "      <td>2019年</td>\n",
       "      <td>1010.8</td>\n",
       "      <td>交通运输、仓储和邮政业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>北京市</td>\n",
       "      <td>2018年</td>\n",
       "      <td>1015.9</td>\n",
       "      <td>交通运输、仓储和邮政业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>北京市</td>\n",
       "      <td>2017年</td>\n",
       "      <td>901.0</td>\n",
       "      <td>交通运输、仓储和邮政业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>北京市</td>\n",
       "      <td>2016年</td>\n",
       "      <td>790.8</td>\n",
       "      <td>交通运输、仓储和邮政业</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  region   year     gdp     industry\n",
       "0    北京市  2020年   836.5  交通运输、仓储和邮政业\n",
       "1    北京市  2019年  1010.8  交通运输、仓储和邮政业\n",
       "2    北京市  2018年  1015.9  交通运输、仓储和邮政业\n",
       "3    北京市  2017年   901.0  交通运输、仓储和邮政业\n",
       "4    北京市  2016年   790.8  交通运输、仓储和邮政业"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gdp = pd.read_csv('1992-2020年中国各省份分行业GDP增加值.csv')\n",
    "gdp.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "0f6e349b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>region</th>\n",
       "      <th>gdp</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>广东省</td>\n",
       "      <td>112.99153</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>江苏省</td>\n",
       "      <td>102.57458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>山东省</td>\n",
       "      <td>80.80705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>浙江省</td>\n",
       "      <td>66.16707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>河南省</td>\n",
       "      <td>55.55375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>四川省</td>\n",
       "      <td>45.50002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>湖北省</td>\n",
       "      <td>43.22174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>上海市</td>\n",
       "      <td>42.54711</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>河北省</td>\n",
       "      <td>41.33852</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>湖南省</td>\n",
       "      <td>40.28980</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   region        gdp\n",
       "11    广东省  112.99153\n",
       "14    江苏省  102.57458\n",
       "9     山东省   80.80705\n",
       "18    浙江省   66.16707\n",
       "17    河南省   55.55375\n",
       "5     四川省   45.50002\n",
       "20    湖北省   43.22174\n",
       "0     上海市   42.54711\n",
       "16    河北省   41.33852\n",
       "21    湖南省   40.28980"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gdp.groupby('region')['gdp'].apply(lambda x:x.sum()/10000).reset_index().sort_values(by='gdp', ascending=False).head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "82efa54e",
   "metadata": {},
   "source": [
    "## 各省GDP值（象形柱状图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "643aa441",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import PictorialBar\n",
    "from pyecharts.globals import SymbolType"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "5091a195",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"73798ec205c847b18af5c85ed4d2462b\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_73798ec205c847b18af5c85ed4d2462b = echarts.init(\n",
       "                    document.getElementById('73798ec205c847b18af5c85ed4d2462b'), 'white', {renderer: 'canvas'});\n",
       "                var option_73798ec205c847b18af5c85ed4d2462b = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pictorialBar\",\n",
       "            \"symbol\": \"roundRect\",\n",
       "            \"symbolSize\": 18,\n",
       "            \"symbolOffset\": [\n",
       "                0,\n",
       "                0\n",
       "            ],\n",
       "            \"symbolRepeat\": \"fixed\",\n",
       "            \"symbolClip\": true,\n",
       "            \"data\": [\n",
       "                112.99152999999998,\n",
       "                102.57458000000001,\n",
       "                80.80705,\n",
       "                66.16707000000001,\n",
       "                55.55375,\n",
       "                45.500020000000006,\n",
       "                43.22173999999999,\n",
       "                42.547109999999996,\n",
       "                41.33852,\n",
       "                40.2898\n",
       "            ],\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 0,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"show\": false,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5e7f\\u4e1c\\u7701\",\n",
       "                \"\\u6c5f\\u82cf\\u7701\",\n",
       "                \"\\u5c71\\u4e1c\\u7701\",\n",
       "                \"\\u6d59\\u6c5f\\u7701\",\n",
       "                \"\\u6cb3\\u5357\\u7701\",\n",
       "                \"\\u56db\\u5ddd\\u7701\",\n",
       "                \"\\u6e56\\u5317\\u7701\",\n",
       "                \"\\u4e0a\\u6d77\\u5e02\",\n",
       "                \"\\u6cb3\\u5317\\u7701\",\n",
       "                \"\\u6e56\\u5357\\u7701\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"1992-2020\\u5e74Top10\\u7701GDP\\u589e\\u52a0\\u503c\\u6570\\u636e\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_73798ec205c847b18af5c85ed4d2462b.setOption(option_73798ec205c847b18af5c85ed4d2462b);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20419485220>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gdp_top10 = gdp.groupby('region')['gdp'].apply(lambda x:x.sum()/10000).reset_index().sort_values(by='gdp', ascending=False).head(10)\n",
    "\n",
    "c = (\n",
    "    PictorialBar()\n",
    "    .add_xaxis(list(gdp_top10['region']))\n",
    "    .add_yaxis(\n",
    "        \"\",\n",
    "        list(gdp_top10['gdp']),\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "        symbol_size=18,\n",
    "        symbol_repeat=\"fixed\",\n",
    "        symbol_offset=[0, 0],\n",
    "        is_symbol_clip=True,\n",
    "        symbol=SymbolType.ROUND_RECT,\n",
    "    )\n",
    "    .reversal_axis()\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"1992-2020年Top10省GDP增加值数据\"),\n",
    "        xaxis_opts=opts.AxisOpts(is_show=False),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=False),\n",
    "            axisline_opts=opts.AxisLineOpts(\n",
    "                linestyle_opts=opts.LineStyleOpts(opacity=0)\n",
    "            ),\n",
    "        ),\n",
    "    )\n",
    "#     .render(\"pictorialbar_base.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "8f798129",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'macarons':'https://assets.pyecharts.org/assets/themes/macarons'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"3a84597e153e4237a3eaf0e47c2f1603\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'macarons'], function(echarts) {\n",
       "                var chart_3a84597e153e4237a3eaf0e47c2f1603 = echarts.init(\n",
       "                    document.getElementById('3a84597e153e4237a3eaf0e47c2f1603'), 'macarons', {renderer: 'canvas'});\n",
       "                var option_3a84597e153e4237a3eaf0e47c2f1603 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"GDP\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                112.99152999999998,\n",
       "                102.57458000000001,\n",
       "                80.80705,\n",
       "                66.16707000000001,\n",
       "                55.55375,\n",
       "                45.500020000000006,\n",
       "                43.22173999999999,\n",
       "                42.547109999999996,\n",
       "                41.33852,\n",
       "                40.2898\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"1992-2020\\u5e74Top10\\u7701GDP\\u589e\\u52a0\\u503c\\u6570\\u636e\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbol\": \"emptyCircle\",\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\\u7701\",\n",
       "                    112.99152999999998\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\\u7701\",\n",
       "                    102.57458000000001\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\\u7701\",\n",
       "                    80.80705\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\\u7701\",\n",
       "                    66.16707000000001\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\\u7701\",\n",
       "                    55.55375\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\\u7701\",\n",
       "                    45.500020000000006\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\\u7701\",\n",
       "                    43.22173999999999\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\\u5e02\",\n",
       "                    42.547109999999996\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\\u7701\",\n",
       "                    41.33852\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\\u7701\",\n",
       "                    40.2898\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"GDP\",\n",
       "                \"1992-2020\\u5e74Top10\\u7701GDP\\u589e\\u52a0\\u503c\\u6570\\u636e\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"GDP\": true,\n",
       "                \"1992-2020\\u5e74Top10\\u7701GDP\\u589e\\u52a0\\u503c\\u6570\\u636e\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5e7f\\u4e1c\\u7701\",\n",
       "                \"\\u6c5f\\u82cf\\u7701\",\n",
       "                \"\\u5c71\\u4e1c\\u7701\",\n",
       "                \"\\u6d59\\u6c5f\\u7701\",\n",
       "                \"\\u6cb3\\u5357\\u7701\",\n",
       "                \"\\u56db\\u5ddd\\u7701\",\n",
       "                \"\\u6e56\\u5317\\u7701\",\n",
       "                \"\\u4e0a\\u6d77\\u5e02\",\n",
       "                \"\\u6cb3\\u5317\\u7701\",\n",
       "                \"\\u6e56\\u5357\\u7701\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": {\n",
       "        \"text\": \"1992-2020\\u5e74TOP10\\u7701GDP\\u589e\\u52a0\\u503c\",\n",
       "        \"subtext\": \"\\u5806\\u53e0\\u67f1\\u72b6\\u56fe\"\n",
       "    }\n",
       "};\n",
       "                chart_3a84597e153e4237a3eaf0e47c2f1603.setOption(option_3a84597e153e4237a3eaf0e47c2f1603);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20419485160>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Bar\n",
    "from pyecharts.faker import Faker\n",
    "from pyecharts.globals import ThemeType\n",
    "from pyecharts.charts import Line\n",
    "\n",
    "gdp_top10 = gdp.groupby('region')['gdp'].apply(lambda x:x.sum()/10000).reset_index().sort_values(by='gdp', ascending=False).head(10)\n",
    "x = list(gdp_top10['region'])\n",
    "y = list(gdp_top10['gdp'])\n",
    "c = (\n",
    "    Bar({\"theme\": ThemeType.MACARONS})\n",
    "    .add_xaxis(x)\n",
    "    .add_yaxis(\"GDP\", y)\n",
    "    .set_global_opts(\n",
    "        title_opts={\"text\": \"1992-2020年TOP10省GDP增加值\", \"subtext\": \"堆叠柱状图\"}\n",
    "    ))\n",
    "line = (\n",
    "    Line()\n",
    "    .set_global_opts(\n",
    "        tooltip_opts=opts.TooltipOpts(is_show=False),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "    )\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"1992-2020年Top10省GDP增加值数据\",\n",
    "        y_axis=y,\n",
    "        symbol=\"emptyCircle\",\n",
    "        is_symbol_show=True,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    ))\n",
    "# c.overlap(line).render(\"1992-2020年Top10省GDP增加值数据堆叠.html\")\n",
    "c.overlap(line).render_notebook()\n",
    "# line.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3f04630a",
   "metadata": {},
   "source": [
    "## 各行业GDP（堆叠图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "9da350d8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'macarons':'https://assets.pyecharts.org/assets/themes/macarons'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"4245079b16064688af5cde7f4d1f59cc\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'macarons'], function(echarts) {\n",
       "                var chart_4245079b16064688af5cde7f4d1f59cc = echarts.init(\n",
       "                    document.getElementById('4245079b16064688af5cde7f4d1f59cc'), 'macarons', {renderer: 'canvas'});\n",
       "                var option_4245079b16064688af5cde7f4d1f59cc = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"GDP\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                380.96952000000005,\n",
       "                192.22292000000002,\n",
       "                97.81846999999999,\n",
       "                97.67741000000001,\n",
       "                68.63911999999999,\n",
       "                66.753,\n",
       "                60.45405,\n",
       "                49.64399,\n",
       "                19.3543\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"1992-2020TOP10\\u884c\\u4e1aGDP\\u589e\\u52a0\\u8d8b\\u52bf\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbol\": \"emptyCircle\",\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u5de5\\u4e1a\",\n",
       "                    380.96952000000005\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5176\\u4ed6\\u884c\\u4e1a\",\n",
       "                    192.22292000000002\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6279\\u53d1\\u548c\\u96f6\\u552e\\u4e1a\",\n",
       "                    97.81846999999999\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u519c\\u6797\\u7267\\u6e14\\u4e1a\",\n",
       "                    97.67741000000001\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5efa\\u7b51\\u4e1a\",\n",
       "                    68.63911999999999\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91d1\\u878d\\u4e1a\",\n",
       "                    66.753\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u623f\\u5730\\u4ea7\\u4e1a\",\n",
       "                    60.45405\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4ea4\\u901a\\u8fd0\\u8f93\\u3001\\u4ed3\\u50a8\\u548c\\u90ae\\u653f\\u4e1a\",\n",
       "                    49.64399\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4f4f\\u5bbf\\u548c\\u9910\\u996e\\u4e1a\",\n",
       "                    19.3543\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"GDP\",\n",
       "                \"1992-2020TOP10\\u884c\\u4e1aGDP\\u589e\\u52a0\\u8d8b\\u52bf\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"GDP\": true,\n",
       "                \"1992-2020TOP10\\u884c\\u4e1aGDP\\u589e\\u52a0\\u8d8b\\u52bf\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5de5\\u4e1a\",\n",
       "                \"\\u5176\\u4ed6\\u884c\\u4e1a\",\n",
       "                \"\\u6279\\u53d1\\u548c\\u96f6\\u552e\\u4e1a\",\n",
       "                \"\\u519c\\u6797\\u7267\\u6e14\\u4e1a\",\n",
       "                \"\\u5efa\\u7b51\\u4e1a\",\n",
       "                \"\\u91d1\\u878d\\u4e1a\",\n",
       "                \"\\u623f\\u5730\\u4ea7\\u4e1a\",\n",
       "                \"\\u4ea4\\u901a\\u8fd0\\u8f93\\u3001\\u4ed3\\u50a8\\u548c\\u90ae\\u653f\\u4e1a\",\n",
       "                \"\\u4f4f\\u5bbf\\u548c\\u9910\\u996e\\u4e1a\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": {\n",
       "        \"text\": \"1992-2020TOP10\\u884c\\u4e1aGDP\\u589e\\u52a0\\u503c\",\n",
       "        \"subtext\": \"\\u5806\\u53e0\\u67f1\\u72b6\\u56fe\"\n",
       "    }\n",
       "};\n",
       "                chart_4245079b16064688af5cde7f4d1f59cc.setOption(option_4245079b16064688af5cde7f4d1f59cc);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x204194df670>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Bar\n",
    "from pyecharts.faker import Faker\n",
    "from pyecharts.globals import ThemeType\n",
    "from pyecharts.charts import Line\n",
    "gdp_top10 = gdp.groupby('industry')['gdp'].apply(lambda x:x.sum()/10000).reset_index().sort_values(by='gdp', ascending=False).head(10)\n",
    "\n",
    "x = list(gdp_top10['industry'])\n",
    "y = list(gdp_top10['gdp'])\n",
    "c = (\n",
    "    Bar({\"theme\": ThemeType.MACARONS})\n",
    "    .add_xaxis(x)\n",
    "    .add_yaxis(\"GDP\", y)\n",
    "    .set_global_opts(\n",
    "        title_opts={\"text\": \"1992-2020TOP10行业GDP增加值\", \"subtext\": \"堆叠柱状图\"}\n",
    "    ))\n",
    "line = (\n",
    "    Line()\n",
    "    .set_global_opts(\n",
    "        tooltip_opts=opts.TooltipOpts(is_show=False),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "    )\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"1992-2020TOP10行业GDP增加趋势\",\n",
    "        y_axis=y,\n",
    "        symbol=\"emptyCircle\",\n",
    "        is_symbol_show=True,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    ))\n",
    "# c.overlap(line).render(\"1992-2020TOP10行业GDP增加值数据堆叠.html\")\n",
    "c.overlap(line).render_notebook()\n",
    "# line.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d3970dcc",
   "metadata": {},
   "source": [
    "# 按三大产业就业人员分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "cdec9244",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>就业人员(万人)</th>\n",
       "      <th>第一产业就业人员(万人)</th>\n",
       "      <th>第二产业就业人员(万人)</th>\n",
       "      <th>第三产业就业人员(万人)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020年</td>\n",
       "      <td>75064</td>\n",
       "      <td>17715</td>\n",
       "      <td>21543</td>\n",
       "      <td>35806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2019年</td>\n",
       "      <td>75447</td>\n",
       "      <td>18652</td>\n",
       "      <td>21234</td>\n",
       "      <td>35561</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2018年</td>\n",
       "      <td>75782</td>\n",
       "      <td>19515</td>\n",
       "      <td>21356</td>\n",
       "      <td>34911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2017年</td>\n",
       "      <td>76058</td>\n",
       "      <td>20295</td>\n",
       "      <td>21762</td>\n",
       "      <td>34001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2016年</td>\n",
       "      <td>76245</td>\n",
       "      <td>20908</td>\n",
       "      <td>22295</td>\n",
       "      <td>33042</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>1956年</td>\n",
       "      <td>23018</td>\n",
       "      <td>18544</td>\n",
       "      <td>2468</td>\n",
       "      <td>2006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>1955年</td>\n",
       "      <td>22328</td>\n",
       "      <td>18592</td>\n",
       "      <td>1913</td>\n",
       "      <td>1823</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>1954年</td>\n",
       "      <td>21832</td>\n",
       "      <td>18151</td>\n",
       "      <td>1882</td>\n",
       "      <td>1799</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>1953年</td>\n",
       "      <td>21364</td>\n",
       "      <td>17747</td>\n",
       "      <td>1715</td>\n",
       "      <td>1902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>1952年</td>\n",
       "      <td>20729</td>\n",
       "      <td>17317</td>\n",
       "      <td>1531</td>\n",
       "      <td>1881</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>69 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       指标  就业人员(万人)  第一产业就业人员(万人)  第二产业就业人员(万人)  第三产业就业人员(万人)\n",
       "0   2020年     75064         17715         21543         35806\n",
       "1   2019年     75447         18652         21234         35561\n",
       "2   2018年     75782         19515         21356         34911\n",
       "3   2017年     76058         20295         21762         34001\n",
       "4   2016年     76245         20908         22295         33042\n",
       "..    ...       ...           ...           ...           ...\n",
       "64  1956年     23018         18544          2468          2006\n",
       "65  1955年     22328         18592          1913          1823\n",
       "66  1954年     21832         18151          1882          1799\n",
       "67  1953年     21364         17747          1715          1902\n",
       "68  1952年     20729         17317          1531          1881\n",
       "\n",
       "[69 rows x 5 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "industry = pd.read_excel('按三大产业分就业人员分布 1952-2020.xlsx')\n",
    "industry"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "3d238d93",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"c7d237e6d0344029bb222653ac12aa33\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_c7d237e6d0344029bb222653ac12aa33 = echarts.init(\n",
       "                    document.getElementById('c7d237e6d0344029bb222653ac12aa33'), 'white', {renderer: 'canvas'});\n",
       "                var option_c7d237e6d0344029bb222653ac12aa33 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u7b2c\\u4e00\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    17317\n",
       "                ],\n",
       "                [\n",
       "                    \"1953\\u5e74\",\n",
       "                    17747\n",
       "                ],\n",
       "                [\n",
       "                    \"1954\\u5e74\",\n",
       "                    18151\n",
       "                ],\n",
       "                [\n",
       "                    \"1955\\u5e74\",\n",
       "                    18592\n",
       "                ],\n",
       "                [\n",
       "                    \"1956\\u5e74\",\n",
       "                    18544\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    19309\n",
       "                ],\n",
       "                [\n",
       "                    \"1958\\u5e74\",\n",
       "                    15490\n",
       "                ],\n",
       "                [\n",
       "                    \"1959\\u5e74\",\n",
       "                    16271\n",
       "                ],\n",
       "                [\n",
       "                    \"1960\\u5e74\",\n",
       "                    17016\n",
       "                ],\n",
       "                [\n",
       "                    \"1961\\u5e74\",\n",
       "                    19747\n",
       "                ],\n",
       "                [\n",
       "                    \"1962\\u5e74\",\n",
       "                    21276\n",
       "                ],\n",
       "                [\n",
       "                    \"1963\\u5e74\",\n",
       "                    21966\n",
       "                ],\n",
       "                [\n",
       "                    \"1964\\u5e74\",\n",
       "                    22801\n",
       "                ],\n",
       "                [\n",
       "                    \"1965\\u5e74\",\n",
       "                    23396\n",
       "                ],\n",
       "                [\n",
       "                    \"1966\\u5e74\",\n",
       "                    24297\n",
       "                ],\n",
       "                [\n",
       "                    \"1967\\u5e74\",\n",
       "                    25165\n",
       "                ],\n",
       "                [\n",
       "                    \"1968\\u5e74\",\n",
       "                    26063\n",
       "                ],\n",
       "                [\n",
       "                    \"1969\\u5e74\",\n",
       "                    27117\n",
       "                ],\n",
       "                [\n",
       "                    \"1970\\u5e74\",\n",
       "                    27811\n",
       "                ],\n",
       "                [\n",
       "                    \"1971\\u5e74\",\n",
       "                    28397\n",
       "                ],\n",
       "                [\n",
       "                    \"1972\\u5e74\",\n",
       "                    28283\n",
       "                ],\n",
       "                [\n",
       "                    \"1973\\u5e74\",\n",
       "                    28857\n",
       "                ],\n",
       "                [\n",
       "                    \"1974\\u5e74\",\n",
       "                    29218\n",
       "                ],\n",
       "                [\n",
       "                    \"1975\\u5e74\",\n",
       "                    29456\n",
       "                ],\n",
       "                [\n",
       "                    \"1976\\u5e74\",\n",
       "                    29443\n",
       "                ],\n",
       "                [\n",
       "                    \"1977\\u5e74\",\n",
       "                    29340\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    28318\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    28634\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    29122\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    29777\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    30859\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    31151\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    30868\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    31130\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    31254\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    31663\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    32249\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    33225\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    38914\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    39098\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    38699\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    37680\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    36628\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    35530\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    34820\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    34840\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    35177\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    35768\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    36043\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    36399\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    36640\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    36204\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    34830\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    33442\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    31941\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    30731\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    29923\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    28890\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    27931\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    26472\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    25535\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    23838\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    22372\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    21418\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    20908\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    20295\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    19515\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    18652\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    17715\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u7b2c\\u4e8c\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    1531\n",
       "                ],\n",
       "                [\n",
       "                    \"1953\\u5e74\",\n",
       "                    1715\n",
       "                ],\n",
       "                [\n",
       "                    \"1954\\u5e74\",\n",
       "                    1882\n",
       "                ],\n",
       "                [\n",
       "                    \"1955\\u5e74\",\n",
       "                    1913\n",
       "                ],\n",
       "                [\n",
       "                    \"1956\\u5e74\",\n",
       "                    2468\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    2142\n",
       "                ],\n",
       "                [\n",
       "                    \"1958\\u5e74\",\n",
       "                    7076\n",
       "                ],\n",
       "                [\n",
       "                    \"1959\\u5e74\",\n",
       "                    5402\n",
       "                ],\n",
       "                [\n",
       "                    \"1960\\u5e74\",\n",
       "                    4112\n",
       "                ],\n",
       "                [\n",
       "                    \"1961\\u5e74\",\n",
       "                    2856\n",
       "                ],\n",
       "                [\n",
       "                    \"1962\\u5e74\",\n",
       "                    2059\n",
       "                ],\n",
       "                [\n",
       "                    \"1963\\u5e74\",\n",
       "                    2038\n",
       "                ],\n",
       "                [\n",
       "                    \"1964\\u5e74\",\n",
       "                    2183\n",
       "                ],\n",
       "                [\n",
       "                    \"1965\\u5e74\",\n",
       "                    2408\n",
       "                ],\n",
       "                [\n",
       "                    \"1966\\u5e74\",\n",
       "                    2600\n",
       "                ],\n",
       "                [\n",
       "                    \"1967\\u5e74\",\n",
       "                    2661\n",
       "                ],\n",
       "                [\n",
       "                    \"1968\\u5e74\",\n",
       "                    2743\n",
       "                ],\n",
       "                [\n",
       "                    \"1969\\u5e74\",\n",
       "                    3030\n",
       "                ],\n",
       "                [\n",
       "                    \"1970\\u5e74\",\n",
       "                    3518\n",
       "                ],\n",
       "                [\n",
       "                    \"1971\\u5e74\",\n",
       "                    3990\n",
       "                ],\n",
       "                [\n",
       "                    \"1972\\u5e74\",\n",
       "                    4276\n",
       "                ],\n",
       "                [\n",
       "                    \"1973\\u5e74\",\n",
       "                    4492\n",
       "                ],\n",
       "                [\n",
       "                    \"1974\\u5e74\",\n",
       "                    4712\n",
       "                ],\n",
       "                [\n",
       "                    \"1975\\u5e74\",\n",
       "                    5152\n",
       "                ],\n",
       "                [\n",
       "                    \"1976\\u5e74\",\n",
       "                    5611\n",
       "                ],\n",
       "                [\n",
       "                    \"1977\\u5e74\",\n",
       "                    5831\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    6945\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    7214\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    7707\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    8003\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    8346\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    8679\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    9590\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    10384\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    11216\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    11726\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    12152\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    11976\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    13856\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    14015\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    14355\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    14965\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    15312\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    15655\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    16203\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    16547\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    16600\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    16421\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    16219\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    16234\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    15682\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    15927\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    16709\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    17766\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    18894\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    20186\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    20553\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    21080\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    21842\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    22539\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    23226\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    23142\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    23057\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    22644\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    22295\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    21762\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    21356\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    21234\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    21543\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u7b2c\\u4e09\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stack\": \"\\u603b\\u91cf\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1952\\u5e74\",\n",
       "                    1881\n",
       "                ],\n",
       "                [\n",
       "                    \"1953\\u5e74\",\n",
       "                    1902\n",
       "                ],\n",
       "                [\n",
       "                    \"1954\\u5e74\",\n",
       "                    1799\n",
       "                ],\n",
       "                [\n",
       "                    \"1955\\u5e74\",\n",
       "                    1823\n",
       "                ],\n",
       "                [\n",
       "                    \"1956\\u5e74\",\n",
       "                    2006\n",
       "                ],\n",
       "                [\n",
       "                    \"1957\\u5e74\",\n",
       "                    2320\n",
       "                ],\n",
       "                [\n",
       "                    \"1958\\u5e74\",\n",
       "                    4034\n",
       "                ],\n",
       "                [\n",
       "                    \"1959\\u5e74\",\n",
       "                    4500\n",
       "                ],\n",
       "                [\n",
       "                    \"1960\\u5e74\",\n",
       "                    4752\n",
       "                ],\n",
       "                [\n",
       "                    \"1961\\u5e74\",\n",
       "                    2987\n",
       "                ],\n",
       "                [\n",
       "                    \"1962\\u5e74\",\n",
       "                    2575\n",
       "                ],\n",
       "                [\n",
       "                    \"1963\\u5e74\",\n",
       "                    2636\n",
       "                ],\n",
       "                [\n",
       "                    \"1964\\u5e74\",\n",
       "                    2752\n",
       "                ],\n",
       "                [\n",
       "                    \"1965\\u5e74\",\n",
       "                    2866\n",
       "                ],\n",
       "                [\n",
       "                    \"1966\\u5e74\",\n",
       "                    2908\n",
       "                ],\n",
       "                [\n",
       "                    \"1967\\u5e74\",\n",
       "                    2988\n",
       "                ],\n",
       "                [\n",
       "                    \"1968\\u5e74\",\n",
       "                    3109\n",
       "                ],\n",
       "                [\n",
       "                    \"1969\\u5e74\",\n",
       "                    3078\n",
       "                ],\n",
       "                [\n",
       "                    \"1970\\u5e74\",\n",
       "                    3103\n",
       "                ],\n",
       "                [\n",
       "                    \"1971\\u5e74\",\n",
       "                    3233\n",
       "                ],\n",
       "                [\n",
       "                    \"1972\\u5e74\",\n",
       "                    3295\n",
       "                ],\n",
       "                [\n",
       "                    \"1973\\u5e74\",\n",
       "                    3303\n",
       "                ],\n",
       "                [\n",
       "                    \"1974\\u5e74\",\n",
       "                    3439\n",
       "                ],\n",
       "                [\n",
       "                    \"1975\\u5e74\",\n",
       "                    3560\n",
       "                ],\n",
       "                [\n",
       "                    \"1976\\u5e74\",\n",
       "                    3780\n",
       "                ],\n",
       "                [\n",
       "                    \"1977\\u5e74\",\n",
       "                    4206\n",
       "                ],\n",
       "                [\n",
       "                    \"1978\\u5e74\",\n",
       "                    4890\n",
       "                ],\n",
       "                [\n",
       "                    \"1979\\u5e74\",\n",
       "                    5177\n",
       "                ],\n",
       "                [\n",
       "                    \"1980\\u5e74\",\n",
       "                    5532\n",
       "                ],\n",
       "                [\n",
       "                    \"1981\\u5e74\",\n",
       "                    5945\n",
       "                ],\n",
       "                [\n",
       "                    \"1982\\u5e74\",\n",
       "                    6090\n",
       "                ],\n",
       "                [\n",
       "                    \"1983\\u5e74\",\n",
       "                    6606\n",
       "                ],\n",
       "                [\n",
       "                    \"1984\\u5e74\",\n",
       "                    7739\n",
       "                ],\n",
       "                [\n",
       "                    \"1985\\u5e74\",\n",
       "                    8359\n",
       "                ],\n",
       "                [\n",
       "                    \"1986\\u5e74\",\n",
       "                    8811\n",
       "                ],\n",
       "                [\n",
       "                    \"1987\\u5e74\",\n",
       "                    9395\n",
       "                ],\n",
       "                [\n",
       "                    \"1988\\u5e74\",\n",
       "                    9933\n",
       "                ],\n",
       "                [\n",
       "                    \"1989\\u5e74\",\n",
       "                    10129\n",
       "                ],\n",
       "                [\n",
       "                    \"1990\\u5e74\",\n",
       "                    11979\n",
       "                ],\n",
       "                [\n",
       "                    \"1991\\u5e74\",\n",
       "                    12378\n",
       "                ],\n",
       "                [\n",
       "                    \"1992\\u5e74\",\n",
       "                    13098\n",
       "                ],\n",
       "                [\n",
       "                    \"1993\\u5e74\",\n",
       "                    14163\n",
       "                ],\n",
       "                [\n",
       "                    \"1994\\u5e74\",\n",
       "                    15515\n",
       "                ],\n",
       "                [\n",
       "                    \"1995\\u5e74\",\n",
       "                    16880\n",
       "                ],\n",
       "                [\n",
       "                    \"1996\\u5e74\",\n",
       "                    17927\n",
       "                ],\n",
       "                [\n",
       "                    \"1997\\u5e74\",\n",
       "                    18432\n",
       "                ],\n",
       "                [\n",
       "                    \"1998\\u5e74\",\n",
       "                    18860\n",
       "                ],\n",
       "                [\n",
       "                    \"1999\\u5e74\",\n",
       "                    19205\n",
       "                ],\n",
       "                [\n",
       "                    \"2000\\u5e74\",\n",
       "                    19823\n",
       "                ],\n",
       "                [\n",
       "                    \"2001\\u5e74\",\n",
       "                    20165\n",
       "                ],\n",
       "                [\n",
       "                    \"2002\\u5e74\",\n",
       "                    20958\n",
       "                ],\n",
       "                [\n",
       "                    \"2003\\u5e74\",\n",
       "                    21605\n",
       "                ],\n",
       "                [\n",
       "                    \"2004\\u5e74\",\n",
       "                    22725\n",
       "                ],\n",
       "                [\n",
       "                    \"2005\\u5e74\",\n",
       "                    23439\n",
       "                ],\n",
       "                [\n",
       "                    \"2006\\u5e74\",\n",
       "                    24143\n",
       "                ],\n",
       "                [\n",
       "                    \"2007\\u5e74\",\n",
       "                    24404\n",
       "                ],\n",
       "                [\n",
       "                    \"2008\\u5e74\",\n",
       "                    25087\n",
       "                ],\n",
       "                [\n",
       "                    \"2009\\u5e74\",\n",
       "                    25857\n",
       "                ],\n",
       "                [\n",
       "                    \"2010\\u5e74\",\n",
       "                    26332\n",
       "                ],\n",
       "                [\n",
       "                    \"2011\\u5e74\",\n",
       "                    27185\n",
       "                ],\n",
       "                [\n",
       "                    \"2012\\u5e74\",\n",
       "                    27493\n",
       "                ],\n",
       "                [\n",
       "                    \"2013\\u5e74\",\n",
       "                    29321\n",
       "                ],\n",
       "                [\n",
       "                    \"2014\\u5e74\",\n",
       "                    30920\n",
       "                ],\n",
       "                [\n",
       "                    \"2015\\u5e74\",\n",
       "                    32258\n",
       "                ],\n",
       "                [\n",
       "                    \"2016\\u5e74\",\n",
       "                    33042\n",
       "                ],\n",
       "                [\n",
       "                    \"2017\\u5e74\",\n",
       "                    34001\n",
       "                ],\n",
       "                [\n",
       "                    \"2018\\u5e74\",\n",
       "                    34911\n",
       "                ],\n",
       "                [\n",
       "                    \"2019\\u5e74\",\n",
       "                    35561\n",
       "                ],\n",
       "                [\n",
       "                    \"2020\\u5e74\",\n",
       "                    35806\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u7b2c\\u4e00\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                \"\\u7b2c\\u4e8c\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                \"\\u7b2c\\u4e09\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u7b2c\\u4e00\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\": true,\n",
       "                \"\\u7b2c\\u4e8c\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\": true,\n",
       "                \"\\u7b2c\\u4e09\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"1952\\u5e74\",\n",
       "                \"1953\\u5e74\",\n",
       "                \"1954\\u5e74\",\n",
       "                \"1955\\u5e74\",\n",
       "                \"1956\\u5e74\",\n",
       "                \"1957\\u5e74\",\n",
       "                \"1958\\u5e74\",\n",
       "                \"1959\\u5e74\",\n",
       "                \"1960\\u5e74\",\n",
       "                \"1961\\u5e74\",\n",
       "                \"1962\\u5e74\",\n",
       "                \"1963\\u5e74\",\n",
       "                \"1964\\u5e74\",\n",
       "                \"1965\\u5e74\",\n",
       "                \"1966\\u5e74\",\n",
       "                \"1967\\u5e74\",\n",
       "                \"1968\\u5e74\",\n",
       "                \"1969\\u5e74\",\n",
       "                \"1970\\u5e74\",\n",
       "                \"1971\\u5e74\",\n",
       "                \"1972\\u5e74\",\n",
       "                \"1973\\u5e74\",\n",
       "                \"1974\\u5e74\",\n",
       "                \"1975\\u5e74\",\n",
       "                \"1976\\u5e74\",\n",
       "                \"1977\\u5e74\",\n",
       "                \"1978\\u5e74\",\n",
       "                \"1979\\u5e74\",\n",
       "                \"1980\\u5e74\",\n",
       "                \"1981\\u5e74\",\n",
       "                \"1982\\u5e74\",\n",
       "                \"1983\\u5e74\",\n",
       "                \"1984\\u5e74\",\n",
       "                \"1985\\u5e74\",\n",
       "                \"1986\\u5e74\",\n",
       "                \"1987\\u5e74\",\n",
       "                \"1988\\u5e74\",\n",
       "                \"1989\\u5e74\",\n",
       "                \"1990\\u5e74\",\n",
       "                \"1991\\u5e74\",\n",
       "                \"1992\\u5e74\",\n",
       "                \"1993\\u5e74\",\n",
       "                \"1994\\u5e74\",\n",
       "                \"1995\\u5e74\",\n",
       "                \"1996\\u5e74\",\n",
       "                \"1997\\u5e74\",\n",
       "                \"1998\\u5e74\",\n",
       "                \"1999\\u5e74\",\n",
       "                \"2000\\u5e74\",\n",
       "                \"2001\\u5e74\",\n",
       "                \"2002\\u5e74\",\n",
       "                \"2003\\u5e74\",\n",
       "                \"2004\\u5e74\",\n",
       "                \"2005\\u5e74\",\n",
       "                \"2006\\u5e74\",\n",
       "                \"2007\\u5e74\",\n",
       "                \"2008\\u5e74\",\n",
       "                \"2009\\u5e74\",\n",
       "                \"2010\\u5e74\",\n",
       "                \"2011\\u5e74\",\n",
       "                \"2012\\u5e74\",\n",
       "                \"2013\\u5e74\",\n",
       "                \"2014\\u5e74\",\n",
       "                \"2015\\u5e74\",\n",
       "                \"2016\\u5e74\",\n",
       "                \"2017\\u5e74\",\n",
       "                \"2018\\u5e74\",\n",
       "                \"2019\\u5e74\",\n",
       "                \"2020\\u5e74\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisTick\": {\n",
       "                \"show\": true,\n",
       "                \"alignWithLabel\": false,\n",
       "                \"inside\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e09\\u5927\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u8d8b\\u52bf\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_c7d237e6d0344029bb222653ac12aa33.setOption(option_c7d237e6d0344029bb222653ac12aa33);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2041951de80>"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pyecharts.options as opts\n",
    "from pyecharts.charts import Line\n",
    "from pyecharts.faker import Faker\n",
    "industry = industry.reindex(index=industry.index[::-1]) #逆序输出\n",
    "x = list(industry['指标'])\n",
    "y1 = list(industry['第一产业就业人员(万人)'])\n",
    "y2 = list(industry['第二产业就业人员(万人)'])\n",
    "y3 = list(industry['第三产业就业人员(万人)'])\n",
    "\n",
    "c = (\n",
    "    Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(\n",
    "        series_name=\"第一产业就业人员\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y1,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .add_yaxis(\n",
    "        series_name=\"第二产业就业人员\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y2,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .add_yaxis(\n",
    "        series_name=\"第三产业就业人员\",\n",
    "        stack=\"总量\",\n",
    "        y_axis=y3,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"三大产业就业趋势\"),\n",
    "        tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "        yaxis_opts=opts.AxisOpts(\n",
    "            type_=\"value\",\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=True),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=True),\n",
    "        ),\n",
    "        xaxis_opts=opts.AxisOpts(type_=\"category\", boundary_gap=False),\n",
    "    )\n",
    "# .render(\"三大产业就业折线图堆叠.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eed22fd2",
   "metadata": {},
   "source": [
    "## 三大产业占比（饼状图）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "3ad119b7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"d6b43077a0ba4f6e9d0afe322746d3a0\" style=\"width:1000px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_d6b43077a0ba4f6e9d0afe322746d3a0 = echarts.init(\n",
       "                    document.getElementById('d6b43077a0ba4f6e9d0afe322746d3a0'), 'white', {renderer: 'canvas'});\n",
       "                var option_d6b43077a0ba4f6e9d0afe322746d3a0 = {\n",
       "    \"backgroundColor\": \"#b7d07a\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"name\": \"\\u6570\\u636e\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7b2c\\u4e8c\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                    \"value\": 0.19145706842781104\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b2c\\u4e09\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                    \"value\": 0.20983686700649326\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b2c\\u4e00\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                    \"value\": 0.5987066412793765\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": \"55%\",\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"roseType\": \"radius\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"color\": \"#fff\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"tooltip\": {\n",
       "                \"show\": true,\n",
       "                \"trigger\": \"item\",\n",
       "                \"triggerOn\": \"mousemove|click\",\n",
       "                \"axisPointer\": {\n",
       "                    \"type\": \"line\"\n",
       "                },\n",
       "                \"showContent\": true,\n",
       "                \"alwaysShowContent\": false,\n",
       "                \"showDelay\": 0,\n",
       "                \"hideDelay\": 100,\n",
       "                \"formatter\": \"{a} <br/>{b}: {c} ({d}%)\",\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14\n",
       "                },\n",
       "                \"borderWidth\": 0,\n",
       "                \"padding\": 5\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u7b2c\\u4e8c\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                \"\\u7b2c\\u4e09\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\",\n",
       "                \"\\u7b2c\\u4e00\\u4ea7\\u4e1a\\u5c31\\u4e1a\\u4eba\\u5458\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": false,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e09\\u5927\\u4ea7\\u4e1a\\u5360\\u6bd4\",\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"20\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#fff\"\n",
       "            }\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_d6b43077a0ba4f6e9d0afe322746d3a0.setOption(option_d6b43077a0ba4f6e9d0afe322746d3a0);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20419555820>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Pie\n",
    "\n",
    "industry = industry.reindex(index=industry.index[::-1]) #逆序输出\n",
    "industry['第一产业就业人员占比'] = industry['第一产业就业人员(万人)']/industry['就业人员(万人)']\n",
    "industry['第二产业就业人员占比'] = industry['第二产业就业人员(万人)']/industry['就业人员(万人)']\n",
    "industry['第三产业就业人员占比'] = industry['第三产业就业人员(万人)']/industry['就业人员(万人)']\n",
    "y1 = industry['第一产业就业人员占比'].mean()\n",
    "y2 = industry['第二产业就业人员占比'].mean()\n",
    "y3 = industry['第三产业就业人员占比'].mean()\n",
    "\n",
    "x_data = ['第一产业就业人员', '第二产业就业人员', '第三产业就业人员']\n",
    "y_data = [y1, y2, y3]\n",
    "data_pair = [list(z) for z in zip(x_data, y_data)]\n",
    "data_pair.sort(key=lambda x: x[1])\n",
    "\n",
    "c = (\n",
    "    Pie(init_opts=opts.InitOpts(width=\"1000px\", height=\"500px\", bg_color=\"#b7d07a\"))\n",
    "    .add(\n",
    "        series_name=\"数据\",\n",
    "        data_pair=data_pair,\n",
    "        rosetype=\"radius\",\n",
    "        radius=\"55%\",\n",
    "        center=[\"50%\", \"50%\"],\n",
    "        label_opts=opts.LabelOpts(is_show=False, position=\"center\"),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title=\"三大产业占比\",\n",
    "            pos_left=\"center\",\n",
    "            pos_top=\"20\",\n",
    "            title_textstyle_opts=opts.TextStyleOpts(color=\"#fff\"),\n",
    "        ),\n",
    "        legend_opts=opts.LegendOpts(is_show=False),\n",
    "    )\n",
    "    .set_series_opts(\n",
    "        tooltip_opts=opts.TooltipOpts(\n",
    "            trigger=\"item\", formatter=\"{a} <br/>{b}: {c} ({d}%)\"\n",
    "        ),\n",
    "        label_opts=opts.LabelOpts(color=\"#fff\"),\n",
    "    )\n",
    "#     .render(\"三大产业占比.html\")\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ecf0543f",
   "metadata": {},
   "source": [
    "# 城镇私营与非私营就业人员关系"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "72eace70",
   "metadata": {},
   "outputs": [
    {
     "ename": "FileNotFoundError",
     "evalue": "[Errno 2] No such file or directory: 'data/people1745/2004-2019年城镇私营与非私营就业人口分布.xlsx'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
      "Input \u001b[1;32mIn [3]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m doing \u001b[38;5;241m=\u001b[39m \u001b[43mpd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_excel\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mdata/people1745/2004-2019年城镇私营与非私营就业人口分布.xlsx\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[0;32m      2\u001b[0m doing\u001b[38;5;241m.\u001b[39mhead()\n",
      "File \u001b[1;32mE:\\anaconda3\\lib\\site-packages\\pandas\\util\\_decorators.py:311\u001b[0m, in \u001b[0;36mdeprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m    305\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(args) \u001b[38;5;241m>\u001b[39m num_allow_args:\n\u001b[0;32m    306\u001b[0m     warnings\u001b[38;5;241m.\u001b[39mwarn(\n\u001b[0;32m    307\u001b[0m         msg\u001b[38;5;241m.\u001b[39mformat(arguments\u001b[38;5;241m=\u001b[39marguments),\n\u001b[0;32m    308\u001b[0m         \u001b[38;5;167;01mFutureWarning\u001b[39;00m,\n\u001b[0;32m    309\u001b[0m         stacklevel\u001b[38;5;241m=\u001b[39mstacklevel,\n\u001b[0;32m    310\u001b[0m     )\n\u001b[1;32m--> 311\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m func(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n",
      "File \u001b[1;32mE:\\anaconda3\\lib\\site-packages\\pandas\\io\\excel\\_base.py:457\u001b[0m, in \u001b[0;36mread_excel\u001b[1;34m(io, sheet_name, header, names, index_col, usecols, squeeze, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, parse_dates, date_parser, thousands, decimal, comment, skipfooter, convert_float, mangle_dupe_cols, storage_options)\u001b[0m\n\u001b[0;32m    455\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(io, ExcelFile):\n\u001b[0;32m    456\u001b[0m     should_close \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m--> 457\u001b[0m     io \u001b[38;5;241m=\u001b[39m \u001b[43mExcelFile\u001b[49m\u001b[43m(\u001b[49m\u001b[43mio\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstorage_options\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mengine\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mengine\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m    458\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m engine \u001b[38;5;129;01mand\u001b[39;00m engine \u001b[38;5;241m!=\u001b[39m io\u001b[38;5;241m.\u001b[39mengine:\n\u001b[0;32m    459\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[0;32m    460\u001b[0m         \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mEngine should not be specified when passing \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m    461\u001b[0m         \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124man ExcelFile - ExcelFile already has the engine set\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m    462\u001b[0m     )\n",
      "File \u001b[1;32mE:\\anaconda3\\lib\\site-packages\\pandas\\io\\excel\\_base.py:1376\u001b[0m, in \u001b[0;36mExcelFile.__init__\u001b[1;34m(self, path_or_buffer, engine, storage_options)\u001b[0m\n\u001b[0;32m   1374\u001b[0m     ext \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mxls\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m   1375\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m-> 1376\u001b[0m     ext \u001b[38;5;241m=\u001b[39m \u001b[43minspect_excel_format\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m   1377\u001b[0m \u001b[43m        \u001b[49m\u001b[43mcontent_or_path\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstorage_options\u001b[49m\n\u001b[0;32m   1378\u001b[0m \u001b[43m    \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m   1379\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m ext \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m   1380\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[0;32m   1381\u001b[0m             \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mExcel file format cannot be determined, you must specify \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m   1382\u001b[0m             \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124man engine manually.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m   1383\u001b[0m         )\n",
      "File \u001b[1;32mE:\\anaconda3\\lib\\site-packages\\pandas\\io\\excel\\_base.py:1250\u001b[0m, in \u001b[0;36minspect_excel_format\u001b[1;34m(content_or_path, storage_options)\u001b[0m\n\u001b[0;32m   1247\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(content_or_path, \u001b[38;5;28mbytes\u001b[39m):\n\u001b[0;32m   1248\u001b[0m     content_or_path \u001b[38;5;241m=\u001b[39m BytesIO(content_or_path)\n\u001b[1;32m-> 1250\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[43mget_handle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m   1251\u001b[0m \u001b[43m    \u001b[49m\u001b[43mcontent_or_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrb\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstorage_options\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mis_text\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\n\u001b[0;32m   1252\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m handle:\n\u001b[0;32m   1253\u001b[0m     stream \u001b[38;5;241m=\u001b[39m handle\u001b[38;5;241m.\u001b[39mhandle\n\u001b[0;32m   1254\u001b[0m     stream\u001b[38;5;241m.\u001b[39mseek(\u001b[38;5;241m0\u001b[39m)\n",
      "File \u001b[1;32mE:\\anaconda3\\lib\\site-packages\\pandas\\io\\common.py:798\u001b[0m, in \u001b[0;36mget_handle\u001b[1;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[0;32m    789\u001b[0m         handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mopen\u001b[39m(\n\u001b[0;32m    790\u001b[0m             handle,\n\u001b[0;32m    791\u001b[0m             ioargs\u001b[38;5;241m.\u001b[39mmode,\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m    794\u001b[0m             newline\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m    795\u001b[0m         )\n\u001b[0;32m    796\u001b[0m     \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m    797\u001b[0m         \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[1;32m--> 798\u001b[0m         handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mhandle\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m    799\u001b[0m     handles\u001b[38;5;241m.\u001b[39mappend(handle)\n\u001b[0;32m    801\u001b[0m \u001b[38;5;66;03m# Convert BytesIO or file objects passed with an encoding\u001b[39;00m\n",
      "\u001b[1;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'data/people1745/2004-2019年城镇私营与非私营就业人口分布.xlsx'"
     ]
    }
   ],
   "source": [
    "doing = pd.read_excel('people1745/2004-2019年城镇私营与非私营就业人口分布.xlsx')\n",
    "doing.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d18fa33",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "303.825px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
